<template>
    <div>
        <h1>户型显示</h1>
        姓名 <input type="text" v-model="info.names">
        会员等级<select v-model="info.dj">
                    <option value="">请选择</option>
                    <option value="普通会员">普通会员</option>
                    <option value="白银会员">白银会员</option>
                    <option value="黄金会员">黄金会员</option>
                    <option value="铂金会员">铂金会员</option>
                    <option value="钻石会员">钻石会员</option>
                </select>
        状态 <select v-model="info.state">
                <option value="">请选择</option>
                <option value="true">开启</option>
                <option value="false">关闭</option>
            </select>
            <input type="button" value="查询" @click="getlist">
        <table class="table table-bordered">
            <tbody>
                <tr>
                    <td>Id</td>
                    <td>用户姓名</td>
                    <td>性别</td>
                    <td>手机号</td>
                    <td>会员等级</td>
                    <td>消费金额</td>
                    <td>消费次数</td>
                    <td>可用积分</td>
                    <td>可用余额</td>
                    <td>启用状态</td>
                </tr>
                

                 <tr v-for="itme in data.list":key="itme.Id">
                    <td>{{ itme.Id }}</td>
                    <td>{{ itme.Name }}</td>
                    <td>{{ itme.Sex?"男":"女" }}</td>
                    <td>{{ itme.Phone }}</td>
                    <td>{{ itme.DJ }}</td>
                    <td>{{ itme.Pric }}</td>
                    <td>{{ itme.CS }}</td>
                    <td>{{ itme.JiFen }}</td>
                    <td>{{ itme.Money }}</td>
                    <td>{{ itme.State ?"开启":"关闭"}}</td>
                </tr>
            </tbody>
        </table>
    </div>
</template>

<script setup lang="ts">
import {ref,reactive, onMounted} from 'vue'
import axios from 'axios';
import { useRouter } from 'vue-router';
const router=useRouter();
let info:any=reactive({
  names:'',
  dj:'',
  state:''
})
let data:any=reactive({
    list:[]
})
onMounted(()=>{
    getlist();
})
const getlist=()=>{
    axios({
        url:'/api/Day/GetShow',
        method:'get',
        params:info
    })
    .then((res)=>{
        console.log(res);
        data.list=res.data
    })
    .catch((err)=>{
        console.log(err);
        
    })
}

</script>

<style scoped>

</style>